<div class="container main_content">
  <h1>Skupine tutoriala</h1>
  
  <table class="admin">

  <% @tutorial_categories.each do |tutorial_category| %>
    <tr>
      <th class="admin narrow"><%= link_to link_to image_tag('black_icons/delete.png', :class => "button"), tutorial_category, :confirm => 'Are you sure?', :method => :delete %></th>
      <th colspan="3" class="admin"><%= link_to tutorial_category.name, edit_tutorial_category_path(tutorial_category) %></th>
    </tr>
    
    <% tutorial_category.tutorials.each do |tutorial| %>
        <tr>
            <td></td>
            <td class="admin narrow"><%= link_to image_tag('black_icons/delete.png', :class => "button"), tutorial, :confirm => 'Are you sure?', :method => :delete %></td>
            <td class="admin narrow"><%= link_to image_tag('black_icons/pencil.png', :class => "button"), edit_tutorial_path(tutorial) %></td>
            <td class="admin"> <%= link_to tutorial.name, frontend_tutorial_path(tutorial.slug)%> </td>
        </tr>
        <% end %>
  <% end %>
  </table>
  
	<div class="admin_links">
		<%= link_to 'Nova skupina', new_tutorial_category_path %> 
		<%= link_to 'Novi tutorial', new_tutorial_path %> 
	</div>
</div>